Zero struct tm on timestamp read so if time tag is malformed, we don't have hour...
authorrobertl <robertl>
Thu, 3 Aug 2006 20:41:58 +0000 (20:41 +0000)
committerrobertl <robertl>
Thu, 3 Aug 2006 20:41:58 +0000 (20:41 +0000)
gpx.c

diff --git a/gpx.c b/gpx.c
index b6bbdfe132081f21e636d4032449d81a0ac5a364..07f3ecdd61a2a464088c028794de6c865217d3b6 100644 (file)
--- a/gpx.c
+++ b/gpx.c
@@ -735,6 +735,8 @@ xml_parse_time( const char *cdatastr )
        struct tm tm;
        time_t rv = 0;
        char *timestr = xstrdup( cdatastr );
+
+       memset(&tm, 0, sizeof(tm));
        
        offsetstr = strchr( timestr, 'Z' );
        if ( offsetstr ) {